Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| JDIC API V0.9 Release 1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jdesktop.jdic.filetypes
Class Action

    java.lang.Object
      org.jdesktop.jdic.filetypes.Action

public class Action
extends java.lang.Object

This class represents an action that could be applied to a particular file type. An action could be added to an `Association` object as part of an association.

An `Action` object is a triple containing a description string, a verb string and a command string. Common examples of verb are "open", "edit", and "print". The command string consists of the executable file path followed by command line parameters.

See Also:
  `Association`

Constructor Summary
`Action(java.lang.String verb, java.lang.String command)` Constructor of an `Action` object.
`Action(java.lang.String verb, java.lang.String command, java.lang.String desc)` Constructor of an `Action` object.

Method Summary
`boolean` | `equals(java.lang.Object otherObj)` Overrides the same method of `java.lang.Object`.
`java.lang.String` | `getCommand()` Returns the value of the command field.
`java.lang.String` | `getDescription()` Returns the value of the description field.
`java.lang.String` | `getVerb()` Returns the value of the verb field.
`int` | `hashCode()` Overrides the same method of `java.lang.Object`.
`void` | `setCommand(java.lang.String command)` Sets the command field.
`void` | `setDescription(java.lang.String description)` Sets the description field.
`void` | `setVerb(java.lang.String verb)` Sets the verb field.
`java.lang.String` | `toString()` Overrides the same method of `java.lang.Object`.

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Action

    public Action(java.lang.String verb,
                  java.lang.String command)

  Constructor of an `Action` object.

  On Microsoft Windows platforms, the verb could be "open", "edit", or any given name; on Gnome/UNIX platforms, it could only be "open", other verbs will be ignored.

Parameters:
  `verb` - a given verb string.
  `command` - a given command string.

### Action

    public Action(java.lang.String verb,
                  java.lang.String command,
                  java.lang.String desc)

  Constructor of an `Action` object.

Parameters:
  `verb` - a given verb value.
  `command` - a given command value.
  `desc` - a given description value.

Method Detail

### getDescription

    public java.lang.String getDescription()

  Returns the value of the description field.

  Returns:
    the value of the description field.

### setDescription

    public void setDescription(java.lang.String description)

  Sets the description field.

  This field is optional for a valid action, and only used for Microsoft Windows platforms.

  Parameters:
    `description` - a given description value.

### getVerb

    public java.lang.String getVerb()

  Returns the value of the verb field.

  Returns:
    the value of the verb field.

### setVerb

    public void setVerb(java.lang.String verb)

  Sets the verb field.

  Parameters:
    `verb` - a given verb value.

### getCommand

    public java.lang.String getCommand()

  Returns the value of the command field.

  Returns:
    the value of the command field.

### setCommand

    public void setCommand(java.lang.String command)

  Sets the command field.

  Parameters:
    `command` - a given command value.

### equals

    public boolean equals(java.lang.Object otherObj)

  Overrides the same method of `java.lang.Object`.

  Determines whether or not two actions are equal. Two instances of `Action` are equal if the values of all the fields are the same.

  Parameters:
    `otherObj` - an object to be compared with this `Action`
  Returns:
    `true` if the object to be compared is an instance of `Action` and has the same values; `false` otherwise.

### hashCode

    public int hashCode()

  Overrides the same method of `java.lang.Object`.

  Returns the hashcode for this `Action`.

  Returns:
    a hash code for this `Action`.``

### toString

    public java.lang.String toString()

  Overrides the same method of `java.lang.Object`.

  Returns a `String` that represents the value of this `Action`.

  Returns:
    a string representation of this `Action`.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| JDIC API V0.9 Release 1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

For more information and documentation on JDIC, see JDIC website.

That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, working code examples, license terms and bug report information.

Copyright (c) 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.